package net.apps.std;

import net.apps.core.meta.AMessage;
import net.apps.core.meta.AProtocol;
import net.apps.core.meta.Meta;

/**
 * Application Control Protocol.
 * 
 * It's a bidirectional protocol.
 * ApplHost sends commands to initialize & shutdown application,
 * may request it's current status, supported protocols and so on.
 * Application respond to host requests, may request to initiate
 * or stop additional services and connections, report error and so on. 
 * 
 * @author Maxim Kizub
 *
 */

@AProtocol(name="net.apps.std.ApplCtrl", description="Application control protocol")
public class ApplCtrlProtocol extends AbsProtocol {

	static final int ID_MSG_HELO = 1;
	static final int ID_MSG_EXIT = 2;
	
	public ApplCtrlProtocol(Meta meta) {
		super(meta);
	}

	@AMessage(id=ID_MSG_HELO, name="Helo", description="Initialization message")
	public final class Helo extends AbsMessage {
		Helo() { super(ID_MSG_HELO); }
	}

	@AMessage(id=ID_MSG_EXIT, name="Exit", description="Exit request")
	public final class Exit extends AbsMessage {
		Exit() { super(ID_MSG_EXIT); }
	}


}
